package com.wzdigit.wms.basic.mapper.core.basic;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzdigit.framework.orm.mybatis.MyBatisRepository;
import com.wzdigit.wms.basic.domain.basic.Vehicle;
import com.wzdigit.wms.basic.client.request.basic.SearchVehicleRequest;
import com.wzdigit.wms.basic.client.response.basic.VehicleApiResponse;
import com.wzdigit.wms.basic.client.response.basic.VehicleResponse;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 车辆 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2020-12-28
 */
@MyBatisRepository
public interface VehicleMapper extends BaseMapper<Vehicle> {
	
	@SuppressWarnings("rawtypes")
	List<VehicleResponse> selectAll(@Param("dto") SearchVehicleRequest dto);
	
	List<VehicleApiResponse> selectAllByStatus(@Param("status") Integer status);
	
	VehicleResponse selectOneByVehicleId(@Param("vehicleId") Integer vehicleId);

	Vehicle selectOneByVehicleNoAndDriver(@Param("vehicleNo") String vehicleNo, 
			@Param("driver") String driver);

	int updateStatus(Vehicle record);
	
    int deleteByPrimaryKey(Integer vehicleId);

    int insert(Vehicle record);

    Vehicle selectByPrimaryKey(Integer vehicleId);

    int updateByPrimaryKeySelective(Vehicle record);

    int updateByPrimaryKey(Vehicle record);
}